import request from "@/axios/request"
import url from "@/axios/url"
const { mesUrl, adminUrl } = url()
// 导出url
export const exportUrl = `${mesUrl}wmsPackingTaskDetail/export`
// 分页查询
export function getList(params = {}) {
  return request({
    url: `${mesUrl}wmsPackingTaskDetail`,
    method: "get",
    params
  })
}
// 新增
export function rowCreate(data = {}) {
  return request({
    url: `${mesUrl}wmsPackingTaskDetail`,
    method: "post",
    data
  })
}
// 修改
export function rowUpdate(data = {}) {
  return request({
    url: `${mesUrl}wmsPackingTaskDetail`,
    method: "put",
    data
  })
}
// 删除
export function rowDel(id) {
  return request({
    url: `${mesUrl}wmsPackingTaskDetail/${id}`,
    method: "put"
  })
}
// 详情
export function rowDetail(id) {
  return request({
    url: `${mesUrl}wmsPackingTaskDetail/info/${id}`,
    method: "get"
  })
}

// 导入用户
export function importData(data = {}) {
  return request({
    url: `${mesUrl}wmsPackingTaskDetail/import`,
    method: "POST",
    data,
    headers: {
      "Content-Type": "multipart/form-data"
    }
  })
}
// 下载模板
export const downloadTemplateUrl = `${mesUrl}wmsPackingTaskDetail/template`

// 查询装箱状态列表
export function getPackingStatusList() {
  return request({
    url: `${adminUrl}dict/type/wms_packing_status`,
    method: "get"
  })
}
// 取出
export function takeout(data = {}) {
  return request({
    url: `${mesUrl}wmsPackingTaskDetail/takeout`,
    method: "post",
    data
  })
}
